home *** CD-ROM | disk | FTP | other *** search
/ Virtual Top Model / Virtual Top Model - Disc 1.iso / modulos / mod-3.dxr / 00045.ls < prev    next >
Encoding:
Text File  |  1997-04-01  |  1.6 KB  |  47 lines

  1. on mouseDown
  2.   global nSalto, nPixelsH, nPixelsV, nLinea, nTotalLineas, mc, mmc, nUltimo, nPrimero
  3.   set nPosH to the mouseH
  4.   set nPosV to the mouseV
  5.   set nUltimo to (nLinea * nSalto) - 2
  6.   set nPrimero to ((nLinea - 1) * nSalto) + 2
  7.   repeat while the stillDown
  8.     cursor([mc, mmc])
  9.     set nStepH to (nPosH - the mouseH) / nPixelsH
  10.     set nStepV to (nPosV - the mouseV) / nPixelsV
  11.     if nStepV < 0 then
  12.       set nPosV to the mouseV
  13.       if (the movieTime of sprite 5 - nSalto) >= 0 then
  14.         set the movieTime of sprite 5 to the movieTime of sprite 5 - nSalto
  15.         set nLinea to nLinea - 1
  16.         set nUltimo to (nLinea * nSalto) - 4
  17.         set nPrimero to (nLinea - 1) * nSalto
  18.       end if
  19.     end if
  20.     if nStepV > 0 then
  21.       set nPosV to the mouseV
  22.       if (the movieTime of sprite 5 + nSalto) < (nSalto * nTotalLineas) then
  23.         set the movieTime of sprite 5 to the movieTime of sprite 5 + nSalto
  24.         set nLinea to nLinea + 1
  25.         set nUltimo to (nLinea * nSalto) - 4
  26.         set nPrimero to (nLinea - 1) * nSalto
  27.       end if
  28.     end if
  29.     if nStepH > 0 then
  30.       set nPosH to the mouseH
  31.       if (the movieTime of sprite 5 + (nStepH * 2)) > nUltimo then
  32.         set the movieTime of sprite 5 to nPrimero
  33.       else
  34.         set the movieTime of sprite 5 to the movieTime of sprite 5 + (nStepH * 2)
  35.       end if
  36.     end if
  37.     if nStepH < 0 then
  38.       set nPosH to the mouseH
  39.       if (the movieTime of sprite 5 + (nStepH * 2)) < nPrimero then
  40.         set the movieTime of sprite 5 to nUltimo
  41.         next repeat
  42.       end if
  43.       set the movieTime of sprite 5 to the movieTime of sprite 5 + (nStepH * 2)
  44.     end if
  45.   end repeat
  46. end
  47.